home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / doslynx / src / turlvi15.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  1.4 KB  |  47 lines

  1. //    Copyright (c) 1993, University of Kansas, All Rights Reserved
  2. //
  3. //    Class:        TURLView
  4. //    Include File:    turlview.h
  5. //    Purpose:    Provide the view of a URL
  6. //    Remarks/Portability/Dependencies/Restrictions:
  7. //    Revision History:
  8. //        12-27-93    created
  9. //        02-02-94    Began a major revision to fully handle a
  10. //                multiple document interface with WWW, take
  11. //                over the formatting and drawing of the
  12. //                old gridtext functions of HText, and optimize
  13. //                memory usage, selecting anchors, the usage of
  14. //                HText's new image file.  See gridtext.
  15. //        02-09-94    Split all members into seperate files.
  16. #include"turlview.h"
  17.  
  18. void TURLView::AnchorSelectPrevious()    {
  19. //    Purpose:    Select the previous anchor in the document.
  20. //    Arguments:    void
  21. //    Return Value:    void
  22. //    Remarks/Portability/Dependencies/Restrictions:
  23. //        Circular selection, go before the start, start again at the
  24. //        end.
  25. //    Revision History:
  26. //        01-30-94    created
  27.  
  28.     //    Only if there are anchors.
  29.     if(TNSCp_anchors->getCount() == 0)    {
  30.         return;
  31.     }
  32.  
  33.     //    Find out what anchor we are on.
  34.     unsigned short int usi_find = TNSCp_anchors->indexOf((void *)
  35.         TAp_selected);
  36.  
  37.     //    Set to the previous anchor, modulus.
  38.     if(usi_find == 0U)    {
  39.         usi_find = TNSCp_anchors->getCount();
  40.     }
  41.     usi_find--;
  42.     TAp_selected = (TextAttribute *)(TNSCp_anchors->at(usi_find));
  43.  
  44.     //    Put the anchor in the view.
  45.     AnchorInView();
  46. }
  47.